import collections.abc
from python_baway.common.xcommon import xcheck

d1 = {'a': 1, 'b': 2, 'c': 3}
keys = d1.keys()
values = d1.values()
items = d1.items()

xcheck(keys)
# collections.abc module provides abstract base classes that can be used to test whether a class provides a particular interface
print(isinstance(keys, collections.abc.KeysView),
      issubclass(collections.abc.KeysView, tuple),
      issubclass(collections.abc.KeysView, list),
      issubclass(collections.abc.KeysView, set))

